package c.francis.utils;

import c.francis.pojo.Member;
import org.springframework.stereotype.Component;

@Component
public class HostHolder {
    private ThreadLocal<Member>   users=new ThreadLocal<>();

    public  void setUser(Member   user){
        users.set(user);
    }

    public Member getUser(){
        return users.get();
    }

    public void clear(){
        users.remove();
    }
}
